﻿using System.Net.WebSockets;
using System;

namespace DesignPattern
{
    class Program
    {
        static void Main(string[] args)
        {
            System.Console.WriteLine("创建型模式：5种");
            System.Console.WriteLine("***********Factory Method Pattern (工厂方法)***********");
            Creational.FactoryMethod.FactoryMethodPattern.Test();
            System.Console.WriteLine("***********Abstract Factory Pattern (抽象工厂)***********");
            Creational.AbstractFactory.AbstractFactoryPattern.Test();
            System.Console.WriteLine("***********Builder Pattern (建造者)***********");
            Creational.Builder.BuilderPattern.Test();
            System.Console.WriteLine("***********Singleton Pattern (单例)***********");
            Creational.Singleton.SingletonPattern.Test();
            System.Console.WriteLine("***********Prototype Pattern (原型)***********");
            Creational.Prototype.PrototypePattern.Test();
            
            System.Console.WriteLine("结构型模式：7种");
            System.Console.WriteLine("***********Adapter Pattern (适配器)***********");
            Structural.Adapter.AdapterPattern.Test();
            System.Console.WriteLine("***********Bridge Pattern (桥接)***********");
            Structural.Bridge.BridgePattern.Test();
            System.Console.WriteLine("***********Composite Pattern (组合)***********");
            Structural.Composite.CompositePattern.Test();
            System.Console.WriteLine("***********Flyweight Pattern (享元)***********");
            Structural.Flyweight.FlyweighPattern.Test();
            System.Console.WriteLine("***********Proxy Pattern (代理)***********");
            Structural.Proxy.ProxyPattern.Test();
            System.Console.WriteLine("***********Facade Pattern (外观)***********");
            Structural.Facade.FacadePattern.Test();
            System.Console.WriteLine("***********Decorator Pattern (装饰器)***********");
            Structural.Decorator.DecoratorPattern.Test();

            System.Console.WriteLine("行为性模式：11种");
            System.Console.WriteLine("***********Command Pattern (命令)***********");
            Behavioral.Command.CommandPattern.Test();
            System.Console.WriteLine("***********Strategy Pattern (策略)***********");
            Behavioral.Strategy.StrategyPattern.Test();
            System.Console.WriteLine("***********Template Pattern (模板)***********");
            Behavioral.Template.TemplatePattern.Test();
            System.Console.WriteLine("***********Chain of Responsibility Pattern (责任链)***********");
            Behavioral.ChainOfResponsibility.ChainOfResponsibilityPattern.Test();
            System.Console.WriteLine("***********State Pattern (状态)***********");
            Behavioral.State.StatePattern.Test();
            System.Console.WriteLine("***********Observer Pattern (观察者)***********");
            Behavioral.Observer.ObserverPattern.Test();
            System.Console.WriteLine("***********Mediator Pattern (中介者)***********");
            Behavioral.Mediator.MediatorPattern.Test();
            System.Console.WriteLine("***********Iterator Pattern (迭代器)***********");
            Behavioral.Iterator.IteratorPattern.Test();
            System.Console.WriteLine("***********Vistor Pattern (访问者)***********");
            Behavioral.Vistor.VistorPattern.Test();
            System.Console.WriteLine("***********Memento Pattern (备忘录)***********");
            Behavioral.Memento.MementoPattern.Test();
            System.Console.WriteLine("***********Interpreter Pattern (解释器)***********");
            Behavioral.Interpreter.InterpreterPattern.Test();
        }
    }
}
